<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<link href="<%=basePath%>/style/form.css" rel="stylesheet" type="text/css"><!-- 表单专用css 必须引入-->
<jsp:include page="/vailidateInclude.jsp" /><!-- 必须引入 表单验证js -->
<jsp:include page="/extInclude.jsp" />
<!-- 如用到ext必须引入 -->
<script type="text/javascript">
<!--
function extCallBack(id,text){
document.getElementById("deptid").value=id;
document.getElementById("deptname").value=text;
document.getElementById("dept.id").value=id;
}
Ext.onReady(function(){
var map='${map}';
    if(map=='{}'){
        document.getElementById("deptname").value='${dept.bmmc}';
        document.getElementById("deptid").value='${dept.id}';
    }
});
//-->
</script>
<s:form action="saveUser.do" method="post" cssClass="required-validate">
	<table width="100%" border="0" align="center" cellpadding="0"
		cellspacing="0" class="xgTitle">
		<tr>
			<td>
				<h5>
					<s:property value="nav" escape="false"/>
				</h5>
			</td>
		</tr>
	</table>
	<table width="100%" border="0" align="center" cellpadding="0"
		cellspacing="1" bgcolor="#EACA62">
		<tr class="xgTr2">
			<td align="right">
				所属部门：
			</td>
			<td>
				<s:hidden name="dept.id" id="dept.id" />
				<s:hidden name="map.bmid" id='deptid' />
				<s:textfield name="map.deptname" id='deptname' readonly="true"
					cssClass="required" size="40" />
				<span  class="maintb1">	
				<input type="button" value="选择" style="width:50px;height:20px;"
					onclick="DeptSelector.getView (extCallBack,true).show()" />
    			</span>
			</td>
		</tr>
		<tr class="xgTr2">
			<td align="right">
				警员警号：
			</td>
			<td>
				<s:hidden name="map.id" />
				<s:textfield name="map.ygzh" cssClass="required" size="40" />
			</td>
		</tr>
		<tr class="xgTr2">
			<td align="right">
				用户姓名：
			</td>
			<td>
				<s:textfield name="map.ygxm" cssClass="required" size="40" />
			</td>
		</tr>
		<tr class="xgTr2">
			<td align="right">
				职务：
			</td>
			<td>
				<s:textfield name="map.ygzw"  size="40" />
			</td>
		</tr>
		<tr class="xgTr2">
			<td align="right">
				排序：
			</td>
			<td>
				<s:textfield name="map.paixu" cssClass="validate-integer" size="40" />
			</td>
		</tr>
		<tr class="xgTr2">
			<td align="right">
				手机：
			</td>
			<td>
				<s:textfield name="map.yggrsj" cssClass="validate-integer" size="40" />
			</td>
		</tr>
		<tr class="xgTr2">
			<td align="right">
				办公电话：
			</td>
			<td>
				<s:textfield name="map.ygbgdh" cssClass="validate-integer" size="40" />
			</td>
		</tr>
		<tr class="xgTr2">
			<td align="right">
				用户说明：
			</td>
			<td>
				<s:textarea name="map.ygbz" cols="40" />
			</td>
		</tr>
		<tr class="xgTr2">
			<td align="right">
				状态：
			</td>
			<td>
				<s:select name="map.ygzt" list="#{'0':'正常','1':'禁用'}" ></s:select>
			</td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0" border="0"
		class="maintb1">
		<tr>
			<td align="center" class="maintb1">
				<input type="submit" value="提 交" />
				&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="reset" value="重 置" />
				&nbsp;&nbsp;&nbsp;&nbsp;
			</td>
		</tr>
	</table>
</s:form>